import request from '@/utils/request'

// 注册
export const register = (data) => {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 登录接口
export const login = (data) => {
  return request({
    url: '/auth/local',
    method: 'POST',
    data
  })
}

// 获取当前用户信息
export const getCurrentUserInfo = () => {
  return request({
    url: '/users/me',
    method: 'get'
  })
}
